package com.dji.compose_learning

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.ui.Modifier
import com.dji.compose_learning.ui.theme.Compose_learningTheme
import com.dji.compose_learning.ui.view.Conversation
import com.dji.compose_learning.ui.view.Message

class ChatMessageListActivity:ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val chatconversation = listOf<Message>(
            Message("buobao","hi,this is buobao talking with you.is that your mom?" +
                    "hi,this is buobao talking with you.is that your mom?" +
                    "hi,this is buobao talking with you.is that your mom?"),
            Message("Jack","hi,My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?"),
            Message("buobao","hi,this is buobao talking with you.is that your mom?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?"),
            Message("James","hi,this is buobao talking with you.is that your mom?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?"),
            Message("Marry","hi,this is buobao talking with you.is that your mom?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?" +
                    "My name is Jack,How are you! are you buobao,is that your mother front of the shop?"))
        setContent {
            Compose_learningTheme {
                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    Conversation(chatconversation)
                }
            }
        }
    }
}